//通过vue-router插件实现模板路由配置
import { createRouter, createWebHashHistory } from 'vue-router'
//引入静态路由
import { constantRoute } from './routes'
const router = createRouter({
  history: createWebHashHistory(),
  //Initial list of routes that should be added to the router.
  //@ts-ignore
  routes: constantRoute,
  //滚动行为，每次切换路由，界面窗口的默认位置
  scrollBehavior() {
    return {
      left: 0,
      top: 0,
    }
  },
})

export default router
